//Put Javascript into strict mode
"use strict";

if(!Plurious){
    var Plurious = {};
}

/**
 * Asynchrously loads all required javascript and initializes the appliation.
 */
(function(){
    Modernizr.load(
        [
        {
            load : [
            '//code.jquery.com/jquery-1.7.js',
            '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js',
            '//jqueryui.com/themeroller/themeswitchertool/',
            ],
            complete: function () {
                if ( !window.jQuery ) {
                    Modernizr.load('base/js/jquery/jquery-1.7.min.js');
                }
                if ( !jQuery.UI ) {
                    Modernizr.load('base/js/jquery/jquery-ui-1.8.16.custom.min.js');
                }
                if ( !jQuery.themeswitcher ){
                    Modernizr.load('base/js/jquery/themes/themeswitchertool.js');
                }
            }

        }, {
            load: [
            'base/js/jquery/webshim/polyfiller.js',
//            'base/js/jquery/themes/theme-helpers.js',
//            'base/js/css3-mediaqueries.js',
            'base/js/main.js'
            ]
        }
        ] );
})();
